import React from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import RouterTransition from './RouterTransition';
import PageA from './PageA';
import PageB from './PageB';

// 入口组件，配置子路由
const RouterTest = () => {
  return (
    <Routes>
      {/* 嵌套路由，所有动画和切换都在 RouterTransition 里处理 */}
      <Route path="" element={<Navigate to="a" replace />} />
      <Route path="a" element={<RouterTransition />} />
      <Route path="b" element={<RouterTransition />} />
    </Routes>
  );
};

export default RouterTest;
